﻿<UserControl x:Class="Gat.Controls.AboutControlView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:local="clr-namespace:Gat.Controls"
			 MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
			 Background="LightGray"
			 MaxWidth="500"
			 BorderThickness="1"
			 BorderBrush="Black"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<UserControl.Resources>
		<local:AboutControlViewModel x:Key="ViewModel" />
	</UserControl.Resources>
	
	<Grid DataContext="{Binding Source={StaticResource ViewModel}}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>

		<!-- Logo and Title -->
		<Grid Grid.Column="0"
			  Grid.Row="0"
			  Margin="10">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>

			<Image x:Name="ApplicationLogo"
				   Grid.Column="0"
				   Grid.Row="0"
				   Width="42"
				   Height="42"
				   Source="{Binding ApplicationLogo}" />
			<Label x:Name="Title"
				   Content="{Binding Title}"
				   Grid.Column="1"
				   Grid.Row="0"
				   FontSize="16" />
		</Grid>
		
		<!-- Description -->
		<TextBlock x:Name="Description"
				   Grid.Column="0"
				   Grid.Row="1"
				   Margin="10,0,10,0"
				   TextWrapping="Wrap"
				   Text="{Binding Description}"/>

		<!-- Version -->
		<Grid Grid.Column="0"
			  Grid.Row="2"
			  Margin="10">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>

			<TextBlock Grid.Column="0"
					   Grid.Row="0"
					   VerticalAlignment="Center"
					   Text="Version: " />
			<Label x:Name="Version"
				   Content="{Binding Version}"
				   Grid.Column="1"
				   Grid.Row="0" />
		</Grid>
		
		<!-- Publisher -->
		<Grid Grid.Column="0"
			  Grid.Row="3"
			  Margin="10, 20">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>

			<Image x:Name="PublisherLogo"
				   Grid.Column="0"
				   Grid.RowSpan="2"
				   Width="36"
				   Height="36"
				   Source="{Binding PublisherLogo}" />
			<TextBlock x:Name="Copyright"
					   Grid.Column="1"
					   Grid.Row="0"
					   Margin="5,2,0,0"
					   Text="{Binding Copyright}"/>
			<Label Grid.Column="1"
				   Grid.Row="1">
				<Hyperlink x:Name="Hyperlink"
						   RequestNavigate="Link_RequestNavigate"
						   NavigateUri="{Binding Hyperlink}">
					<TextBlock x:Name="HyperlinkText"
							   Text="{Binding HyperlinkText}"/>
				</Hyperlink>
			</Label>
		</Grid>

		<!-- Additional Notes -->
		<TextBlock x:Name="AdditionalNotes"
				   Grid.Column="0"
				   Grid.Row="4"
				   Margin="10,0,10,10"
				   TextWrapping="Wrap"
				   Text="{Binding AdditionalNotes}"/>
	</Grid>
</UserControl>
